package warp;

import java.util.Scanner;

public class WarpClass {
    public static void main(String[] args) {
        int n = 5;
        Integer x= 8; //相当于Integer x1 = Integer.valueOf(8);
        System.out.println(x);
        Integer x1 = Integer.valueOf(8);
        System.out.println(x1);


        Double d = 3.5;//相当于Double dx = Double.valueOf(3.5);
        System.out.println(d);
        Double dx = Double.valueOf(3.5);
        System.out.println(dx);

        int a = x;
        a = x.intValue();
        double b = d;
        b = d.doubleValue();

        long t1 = System.currentTimeMillis();
        int sum = 0;
        for(int i=0;i<500000;i++){
            sum += 1;
        }
        long t2 = System.currentTimeMillis();
        Integer sumI = 0;
        for(int i=0;i<500000;i++){
            sumI += i;
        }
        long t3 = System.currentTimeMillis();
        System.out.println(t2-t1);
        System.out.println(t3-t2);


        Integer i1 = 20;
        Integer i2 = 20;
        System.out.println(i1 == i2);
        i1 = 128;
        i2 = 128;
        System.out.println(i1 == i2);

        int max = Integer.MAX_VALUE;
        int min = Integer.MIN_VALUE;
        long lmax = Long.MAX_VALUE;
        long lmin = Long.MIN_VALUE;
        System.out.println(max);
        System.out.println(min);
        System.out.println(lmax);
        System.out.println(lmin);


        String str = "1234";
        int num = Integer.parseInt(str);
        str = "123.56";
        double dnum = Double.parseDouble(str);
        System.out.println(num);
        System.out.println(dnum);


        Scanner in = new Scanner(System.in);
        System.out.println("输入年龄:");
        String st = in.nextLine();
        int age = Integer.parseInt(st);
        System.out.println(age);


    }
}
